home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 001 / wimpinfo / !WimpInfo_Source (.txt) < prev    next >
Encoding:
RISC OS BBC BASIC V Source  |  1994-09-04  |  17.5 KB  |  669 lines

  1.  This application is FreeWare. (c) 1994 Dick Alstein
  2. initialize
  3. error
  4. QuitProgram%=
  5. 2PollMask%=(1<<0)+(1<<4)+(1<<5)+(1<<11)+(1<<12)
  6.  "Wimp_Poll",PollMask%,PollBlk% 
  7.  ReasonCode%
  8.  ReasonCode% 
  9.  0 : 
  10.  Null_Event
  11. $      
  12.  ShiftAct%) 
  13.  -1) 
  14. .        
  15.  Active% 
  16.  1<<0 
  17. update_wininfo
  18. /        
  19.  Active% 
  20.  1<<1 
  21. update_iconinfo
  22. .        
  23.  Active% 
  24.  1<<2 
  25. update_ptrinfo
  26.       
  27. #    
  28.  2 : 
  29.  Open_Window_Request
  30. (      
  31.  "Wimp_OpenWindow",,PollBlk%
  32. $    
  33.  3 : 
  34.  Close_Window_Request
  35. )      
  36.  "Wimp_CloseWindow",,PollBlk%
  37.       
  38.  PollBlk%!0 
  39.         
  40.  WinInfoWindow%
  41.           
  42. setactive(0,
  43.         
  44.  IconInfoWindow%
  45.           
  46. setactive(1,
  47.         
  48.  PtrInfoWindow%
  49.           
  50. setactive(2,
  51.       
  52.  6 : 
  53.  Mouse_Click
  54.       
  55. mouseclick(PollBlk%)
  56.  8 : 
  57.  Key_Pressed
  58. *      
  59.  "Wimp_ProcessKey",PollBlk%!24
  60.  9 : 
  61.  Menu_Selection
  62.       
  63. menuselect(PollBlk%)
  64. "7    
  65.  17,18 : 
  66.  User_Message, User_Message_Recorded
  67.       
  68. receive(PollBlk%)
  69.  QuitProgram%
  70.  "Wimp_CloseDown"
  71.  --- END OF MAIN PROGRAM ---
  72.  *** Close a window
  73.  IN  handle% = window to be closed
  74. closewindow(handle%)
  75. ScrapBlk%!0=handle%
  76.  "Wimp_CloseWindow",,ScrapBlk%
  77.  *** Pop up an error box
  78.  IN  err$ = error text
  79.      cancel% = if <>0 then make 'Cancel' button, otherwise only 'OK'
  80.  OUT TRUE if user clicked 'OK' button
  81. errbox(err$,cancel%)
  82.  flags%
  83. ErrorBlk%!0=0
  84. $(ErrorBlk%+4)=err$+
  85.  cancel% 
  86.   flags%=3
  87.   flags%=1
  88.  "Wimp_ReportError",err$,flags%,ApplName$ 
  89.  ,click%
  90. =(click%=1)
  91.  *** Error handling procedure
  92.  Reports error, and quits program if user clicks 'Cancel'
  93. error
  94.  "Wimp_CloseDown" : 
  95. errbox(
  96. $+" (line "+
  97. )+")",
  98.  clicked 'Cancel' - quit immediately
  99.  "Wimp_CloseDown"
  100.  *** Create an icon on the icon bar
  101.    icon type is sprite-only, non-indirected
  102.    the sprite is supposed to be in the Wimp sprite area
  103.  IN  spritename$ = name of sprite
  104.  OUT number of the icon
  105. iconbaricon(spritename$)
  106.  iconhandle%
  107. Y<ScrapBlk%!0=-1              : 
  108.  window handle = icon bar
  109. Z8ScrapBlk%!4=0               : 
  110.  minimum X coordinate
  111. [*ScrapBlk%!8=0               : 
  112.  min. Y
  113. \*ScrapBlk%!12=68             : 
  114.  max. X
  115. ]*ScrapBlk%!16=68             : 
  116.  max. Y
  117. ^.ScrapBlk%!20=&7000301A      : 
  118.  icon flags
  119. _2$(ScrapBlk%+24)=spritename$ : 
  120.  name of sprite
  121.  "Wimp_CreateIcon",,ScrapBlk% 
  122.  iconhandle%
  123. =iconhandle%
  124.  *** Indicates if a certain icon has been selected
  125.  IN  window% = handle of the window
  126.      icon%   = number of the icon
  127.  OUT TRUE if icon is selected, FALSE if not selected
  128. iconselected(window%,icon%)
  129. ScrapBlk%!0=window%
  130. ScrapBlk%!4=icon%
  131.  "Wimp_GetIconState",,ScrapBlk%
  132. l#=((ScrapBlk%!24) 
  133.  (1<<21)) > 0
  134.  *** Initialize all the necessary stuff
  135. initialize
  136. ApplName$="WimpInfo"
  137. ApplDir$="<WimpInfo$Dir>"
  138. s"ApplVersion$="1.00 (4-Sep-94)"
  139.  ErrorBlk% 256 : 
  140.  block for error data
  141.  "Wimp_Initialise",200,&4B534154,ApplName$ 
  142.  OSversion%,MyTaskHandle%
  143. error
  144.  ScrapBlk% 256 : 
  145.  general-purpose memory block
  146.  WorkBlk% 2048 : 
  147.  memory block for storing larger data
  148.  PollBlk% 256  : 
  149.  memory block for data from Wimp_Poll
  150. z'IbarIcon%=
  151. iconbaricon("!WimpInfo")
  152. {PIndirsize%=1200             : 
  153.  size of indirected data for template windows
  154.  Indir% Indirsize%       : 
  155.  buffer for indirected data
  156. }IIndirend%=Indir%+Indirsize% : 
  157.  address after last byte of indirected
  158.  IconBType$(15)          : 
  159.  names of icon button types
  160.  WinBType$(15)           : 
  161.  names of window button types
  162. IconBType$(0)="Never"
  163. IconBType$(1)="Always"
  164. IconBType$(2)="Auto-repeat"
  165. IconBType$(3)="Click"
  166. IconBType$(4)="Release"
  167.  IconBType$(5)="Double click"
  168. IconBType$(6)="Click/Drag"
  169.  IconBType$(7)="Release/Drag"
  170. IconBType$(8)="Double/Drag"
  171. IconBType$(9)="Menu"
  172. &IconBType$(10)="Double/Click/Drag"
  173. IconBType$(11)="Radio"
  174. "IconBType$(12)="12 (reserved)"
  175. "IconBType$(13)="13 (reserved)"
  176. %IconBType$(14)="Write/Click/Drag"
  177. IconBType$(15)="Writable"
  178. WinBType$(0)="Never"
  179. WinBType$(1)="Always"
  180. WinBType$(2)="Auto-repeat"
  181. WinBType$(3)="Click"
  182. WinBType$(4)="Release"
  183. WinBType$(5)="Double click"
  184. WinBType$(6)="Click/Drag"
  185. WinBType$(7)="Release/Drag"
  186. WinBType$(8)="Double/Drag"
  187. WinBType$(9)="Click"
  188. %WinBType$(10)="Double/Click/Drag"
  189. WinBType$(11)="Click/Drag"
  190. !WinBType$(12)="12 (reserved)"
  191. !WinBType$(13)="13 (reserved)"
  192. !WinBType$(14)="14 (reserved)"
  193. WinBType$(15)="Writable"
  194.  load the templates and create windows with it
  195.  "Wimp_OpenTemplate",,ApplDir$+".Templates"
  196. %InfoWindow%=
  197. loadtemplate("Info")
  198. .WinInfoWindow%=
  199. loadtemplate("WindowInfo")
  200. -IconInfoWindow%=
  201. loadtemplate("IconInfo")
  202. +PtrInfoWindow%=
  203. loadtemplate("PtrInfo")
  204.  "Wimp_CloseTemplate"
  205. seticontext(InfoWindow%,7,ApplVersion$)
  206.  "MenuUtil_Initialise",010,0 : 
  207.  initialise MenuUtils module
  208. initmenus
  209. readscreenvars
  210. Active%=0
  211. LastActive%=1<<1
  212. ShiftAct%=
  213.  *** Construct the menus
  214. initmenus
  215. "MainMenu%=
  216. menu_new(ApplName$)
  217. 0Item_Info%=
  218. menu_add("Info",InfoWindow%,1,0)
  219. 1Item_WinInfo%=
  220. menu_add("Window info",-1,0,0)
  221. 0Item_IconInfo%=
  222. menu_add("Icon info",-1,0,0)
  223. 0Item_PtrInfo%=
  224. menu_add("Mouse info",-1,1,0)
  225. 6Item_ShiftAct%=
  226. menu_add("Shift-activated",-1,0,0)
  227. 'Item_Quit%=
  228. menu_add("Quit",-1,0,0)
  229.  *** Load a template definition and create a window with it
  230.  IN  name$ = name of template
  231.  OUT window handle of created window
  232. loadtemplate(name$)
  233.  handle%
  234.  "Wimp_CloseTemplate" : 
  235. error
  236.  "Wimp_LoadTemplate",,WorkBlk%+4,Indir%,Indirend%,-1,name$,0 
  237.  ,,Indir%
  238.  "Wimp_CreateWindow",,WorkBlk%+4 
  239.  handle%
  240. =handle%
  241.  *** Add an item to the current menu
  242.  IN  text$    = text of item
  243.      submenu% = submenu -
  244.                    -1            if no submenu attached to this item
  245.                    menu handle   if normal submenu
  246.                    window handle if submenu is a window
  247.      dotline% = if <> 0 then draw dotted line below item
  248.      genmsg%  = if <> 0 then Wimp generates message if submenu opened
  249.  OUT handle of new item
  250. menu_add(text$,submenu%,dotline%,genmsg%)
  251.  handle%
  252.  "MenuUtil_Add",,text$ 
  253.  handle%
  254.  submenu%<>-1 
  255.  "MenuUtil_SubMenu",handle%,submenu%
  256.  dotline% 
  257.  "MenuUtil_Dots",,1
  258.  genmsg% 
  259.  "MenuUtil_Warning",handle%,1
  260. =handle%
  261.  *** Add a writable item to the current menu
  262.  IN  maxlen%   = maximum string length of the writable item
  263.      validstr% = pointer to validation string (or 0 for no validation)
  264.  OUT handle of new item
  265. menu_addwritable(maxlen%,validstr%)
  266.  handle%
  267.  "MenuUtil_Add",,"" 
  268.  handle%
  269.  "MenuUtil_Writable",,1,maxlen%,validstr%
  270. =handle%
  271.  *** Create a new menu and make it the current menu
  272.  IN  title$ = menu title
  273.  OUT handle of new menu
  274. menu_new(title$)
  275.  handle%
  276.  "MenuUtil_New",,title$ 
  277.  handle%
  278. =handle%
  279.  *** Show a menu on the screen
  280.  IN  menu%   = handle of menu to be shown
  281.      buffer% = pointer to block with mouse event (as returned by Wimp_Poll)
  282.                or 0 to redisplay last menu
  283. menu_show(menu%,buffer%)
  284.  "MenuUtil_Show",menu%,buffer%
  285.  *** Process menu selection event
  286. menuselect(selection%)
  287.  adjust%,selinfo%,item%,item$,parentitem%
  288.  "MenuUtil_Decode",MainMenu%,selection% 
  289.  ,adjust%,selinfo%
  290. 8item%=selinfo%!8         : 
  291.  handle of selected item
  292. 5item$=
  293. str(selinfo%!12) : 
  294.  text of selected item
  295. Dparentitem%=selinfo%!24  : 
  296.  handle of 'parent' of selected item
  297.  item% 
  298.  Item_WinInfo%
  299. *    
  300. setactive(0,(Active% 
  301.  1<<0)=0,
  302.  Item_IconInfo%
  303. *    
  304. setactive(1,(Active% 
  305.  1<<1)=0,
  306.  Item_PtrInfo%
  307. *    
  308. setactive(2,(Active% 
  309.  1<<2)=0,
  310.  Item_ShiftAct%
  311.     ShiftAct%=
  312.  ShiftAct%
  313. 3    
  314.  "MenuUtil_Tick",Item_ShiftAct%,ShiftAct%
  315.  Item_Quit%
  316.     QuitProgram%=
  317.  adjust% 
  318. menu_show(MainMenu%,0)
  319.  *** Process mouse click event
  320.  IN  buffer% = pointer to buffer containing click event data
  321. mouseclick(buffer%)
  322.  button%,window%,icon%
  323. =button%=PollBlk%!8  : 
  324.  mouse button(s) that were pressed
  325. >window%=PollBlk%!12 : 
  326.  handle of window that click was in
  327. <icon%=PollBlk%!16   : 
  328.  number of icon that click was on
  329.  window% 
  330.  button% 
  331.       
  332.  2 : 
  333.  Menu button
  334. )        
  335. menu_show(MainMenu%,buffer%)
  336.       
  337.  4 : 
  338.  Select button
  339. .        
  340. setactive(0,LastActive% 
  341.  1<<0,
  342.  .        
  343. setactive(1,LastActive% 
  344.  1<<1,
  345. !.        
  346. setactive(2,LastActive% 
  347.  1<<2,
  348.       
  349.  1 : 
  350.  Adjust button
  351.         LastActive%=Active%
  352.         
  353. setactive(0,
  354.         
  355. setactive(1,
  356.         
  357. setactive(2,
  358. '        
  359.  *** Open a window at the screen position where it last was
  360.  window is opened 'on top'
  361.  IN  handle% = window to be opened
  362. openwindow(handle%)
  363. ScrapBlk%!0=handle%
  364.  "Wimp_GetWindowState",,ScrapBlk%
  365. ScrapBlk%!28=-1
  366.  "Wimp_OpenWindow",,ScrapBlk%
  367.  *** Read the dimensions of the current screen mode and store it in variables
  368.  OUT Screensize_X% = horizontal screen size in OS units
  369.      Screensize_Y% = vertical screen size in OS units
  370. readscreenvars
  371.  xeig%,yeig%,xpixels%,ypixels%
  372.  "OS_ReadModeVariable",-1,4 
  373.  ,,xeig%
  374.  "OS_ReadModeVariable",-1,5 
  375.  ,,yeig%
  376.  "OS_ReadModeVariable",-1,11 
  377.  ,,xpixels%
  378.  "OS_ReadModeVariable",-1,12 
  379.  ,,ypixels%
  380. @)Screensize_X%=(xpixels%+1)*(1<<xeig%)
  381. A)Screensize_Y%=(ypixels%+1)*(1<<yeig%)
  382.  *** Process incoming messages
  383. receive(buffer%)
  384.  sender%,senderref%,code%,ack%
  385. H6sender%=buffer%!4    : 
  386.  task handle of the sender
  387. I>senderref%=buffer%!8 : 
  388.  reference number for this message
  389. J)code%=buffer%!16     : 
  390.  message code
  391. K>ack%=0               : 
  392.  must we acknowledge this message?
  393.  sender% <> MyTaskHandle% 
  394.  code% 
  395. N0    
  396.  0 : 
  397.  Message_Quit - program must quit
  398.       QuitProgram%=
  399. P?    
  400.  &400C1 : 
  401.  Message_ModeChange - Wimp mode has changed
  402.       
  403. readscreenvars
  404.  ack%<>0 
  405.     ScrapBlk%!0=256
  406.     ScrapBlk%!12=senderref%
  407.     ScrapBlk%!16=ack%
  408. W2    
  409.  "Wimp_SendMessage",17,ScrapBlk%,sender%
  410.  *** Select or un-select an icon
  411.  IN  window% = handle of the window
  412.      icon%   = number of the icon
  413.      flag%   = if not zero then select the icon, if zero then un-select it
  414. selecticon(window%,icon%,flag%)
  415.  oldflag%
  416. ScrapBlk%!0=window%
  417. ScrapBlk%!4=icon%
  418.  "Wimp_GetIconState",,ScrapBlk%
  419. f%oldflag%=(ScrapBlk%!24) 
  420.  (1<<21)
  421.  flag% 
  422.   ScrapBlk%!8=1<<21
  423.   ScrapBlk%!8=0
  424. ScrapBlk%!12=1<<21
  425.  oldflag%<>ScrapBlk%!8 
  426.  only set when changing
  427.  "Wimp_SetIconState",,ScrapBlk%
  428.  *** Set the "active" state of one of the infos
  429.  IN  no%     = number
  430.      switch% = if not zero then make active, if zero then make inactive
  431.      store%  = if not zero then store new state in variable LastActive%
  432. setactive(no%,switch%,store%)
  433.  window%,item%
  434.  no% 
  435.     window%=WinInfoWindow%
  436.     item%=Item_WinInfo%
  437.     window%=IconInfoWindow%
  438.     item%=Item_IconInfo%
  439.     window%=PtrInfoWindow%
  440.     item%=Item_PtrInfo%
  441.  switch% 
  442.    Active%=Active% 
  443.  (1<<no%)
  444. openwindow(window%)
  445. !  Active%=Active% 
  446. (1<<no%)
  447. closewindow(window%)
  448.  store% 
  449.  LastActive%=Active%
  450.  "MenuUtil_Tick",item%,Active% 
  451.  (1<<no%)
  452.  Active% 
  453. !  PollMask%=PollMask% 
  454.   PollMask%=PollMask% 
  455.  *** Set the text in an icon
  456.  IN  window% = handle of the window
  457.      icon%   = number of the icon
  458.      text$   = new contents
  459. seticontext(window%,icon%,text$)
  460.  ptr%,length%,oldtext$
  461. ScrapBlk%!0=window%
  462. ScrapBlk%!4=icon%
  463.  "Wimp_GetIconState",,ScrapBlk%
  464.  first check the icon flags to see if it's an indirected-text icon
  465.  (ScrapBlk%!24 
  466.  &101)=&101 
  467. ;  length%=ScrapBlk%!36 : 
  468.  max. size of indirected data
  469.   oldtext$=$(ScrapBlk%!28)
  470.  text$<>oldtext$ 
  471. D    
  472.  overwrite old text, restricting the length of the new text
  473. K    $(ScrapBlk%!28)=
  474. text$,length%-1) : 
  475.  "length%-1" - Basic adds a CR
  476. ,    
  477.  then update the icon on the screen
  478.     ScrapBlk%!8=0
  479.     ScrapBlk%!12=0
  480. )    
  481.  "Wimp_SetIconState",,ScrapBlk%
  482.  *** Read a zero-terminated string from memory
  483.  IN  ptr% = pointer to string
  484.  OUT string
  485. str(ptr%)
  486.  i%,s$
  487.  (ptr%?i%>=32) 
  488.  (i%<255)
  489.   s$+=
  490. (ptr%?i%)
  491.   i%+=1
  492.  *** Update the Window Info window
  493. update_wininfo
  494.  window%,icon%,flags%,taskid%,taskname%,taskname$,fullsize%
  495.  "Wimp_GetPointerInfo",,WorkBlk%
  496. window%=WorkBlk%!12
  497. icon%=WorkBlk%!16
  498.  window%<0 
  499. seticontext(WinInfoWindow%,4,
  500. (window%))
  501. seticontext(WinInfoWindow%,4,"&"+
  502. ~(window%))
  503. WorkBlk%!0=window%
  504.  OSversion%<300 
  505.  "Wimp_GetWindowInfo",,WorkBlk%
  506.  "Wimp_GetWindowInfo",,WorkBlk%+1
  507. flags%=WorkBlk%!32
  508. seticontext(WinInfoWindow%,5,"&"+
  509. ~(flags%))
  510. seticontext(WinInfoWindow%,6,WinBType$((WorkBlk%!64)>>12 
  511.  &F))
  512. seticontext(WinInfoWindow%,7,"&"+
  513. ~(WorkBlk%!60))
  514. seticontext(WinInfoWindow%,10,
  515. (WorkBlk%!56))
  516. seticontext(WinInfoWindow%,11,
  517. (WorkBlk%!44))
  518. seticontext(WinInfoWindow%,12,
  519. (WorkBlk%!52))
  520. seticontext(WinInfoWindow%,13,
  521. (WorkBlk%!48))
  522. seticontext(WinInfoWindow%,16,
  523. (WorkBlk%!16))
  524. seticontext(WinInfoWindow%,17,
  525. (WorkBlk%!4))
  526. seticontext(WinInfoWindow%,18,
  527. (WorkBlk%!12))
  528. seticontext(WinInfoWindow%,19,
  529. (WorkBlk%!8))
  530. seticontext(WinInfoWindow%,23,
  531. (WorkBlk%!20))
  532. seticontext(WinInfoWindow%,24,
  533. (WorkBlk%!24))
  534. taskname$=""
  535.  OSversion%>=300 
  536.  send the owner task a dummy acknowledge, just to get the taskhandle
  537.   WorkBlk%!0=256
  538.   WorkBlk%!12=0
  539.   WorkBlk%!16=0
  540.  "Wimp_SendMessage",19,WorkBlk%,window%,icon% 
  541.  ,,taskid%
  542.  "XTaskManager_TaskNameFromHandle",taskid% 
  543.  taskname%;flg%
  544.  (flg% 
  545.  1)=0 
  546. !    taskname$=
  547. str(taskname%)
  548. seticontext(WinInfoWindow%,38,taskname$)
  549. WorkBlk%!0=WinInfoWindow%
  550.  "Wimp_GetWindowState",,WorkBlk%
  551. )fullsize%=((WorkBlk%!32)
  552.  (1<<18))<>0
  553.  fullsize% 
  554. selecticon(WinInfoWindow%,25,flags% 
  555.  1<<1)
  556. selecticon(WinInfoWindow%,26,flags% 
  557.  1<<4)
  558. selecticon(WinInfoWindow%,27,flags% 
  559.  1<<5)
  560. selecticon(WinInfoWindow%,28,flags% 
  561.  1<<6)
  562. selecticon(WinInfoWindow%,29,flags% 
  563.  1<<8)
  564. selecticon(WinInfoWindow%,30,flags% 
  565.  1<<9)
  566. selecticon(WinInfoWindow%,31,flags% 
  567.  1<<10)
  568. selecticon(WinInfoWindow%,32,flags% 
  569.  1<<11)
  570. selecticon(WinInfoWindow%,33,flags% 
  571.  1<<12)
  572. selecticon(WinInfoWindow%,34,flags% 
  573.  1<<13)
  574. selecticon(WinInfoWindow%,35,flags% 
  575.  1<<14)
  576. selecticon(WinInfoWindow%,36,flags% 
  577.  1<<15)
  578.  *** Update the Icon Info window
  579. update_iconinfo
  580.  window%,icon%,flags%,fullsize%
  581.  "Wimp_GetPointerInfo",,WorkBlk%
  582. window%=WorkBlk%!12
  583. icon%=WorkBlk%!16
  584. WorkBlk%!0=window%
  585. WorkBlk%!4=icon%
  586.  window%<0 
  587. seticontext(IconInfoWindow%,3,
  588. (window%))
  589. seticontext(IconInfoWindow%,3,"&"+
  590. ~(window%))
  591. seticontext(IconInfoWindow%,4,
  592. (icon%))
  593.  icon%>=0 
  594.  "Wimp_GetIconState",,WorkBlk%
  595.   flags%=WorkBlk%!24
  596. seticontext(IconInfoWindow%,5,"&"+
  597. ~(WorkBlk%!24))
  598. seticontext(IconInfoWindow%,8,
  599. (WorkBlk%!20))
  600. seticontext(IconInfoWindow%,9,
  601. (WorkBlk%!8))
  602. seticontext(IconInfoWindow%,10,
  603. (WorkBlk%!16))
  604. seticontext(IconInfoWindow%,11,
  605. (WorkBlk%!12))
  606. seticontext(IconInfoWindow%,14,IconBType$((flags%>>12)
  607.  &F))
  608. seticontext(IconInfoWindow%,15,
  609. ((flags%>>16)
  610.  &1F))
  611.  icon%=-4 
  612.     WorkBlk%!0=window%
  613.  OSversion%<300 
  614. +      
  615.  "Wimp_GetWindowInfo",,WorkBlk%
  616.         
  617. -      
  618.  "Wimp_GetWindowInfo",,WorkBlk%+1
  619.         
  620.     flags%=WorkBlk%!60
  621.     flags%=0
  622. seticontext(IconInfoWindow%,5,"")
  623. seticontext(IconInfoWindow%,8,"")
  624. seticontext(IconInfoWindow%,9,"")
  625. seticontext(IconInfoWindow%,10,"")
  626. seticontext(IconInfoWindow%,11,"")
  627. seticontext(IconInfoWindow%,14,"")
  628. seticontext(IconInfoWindow%,15,"")
  629. WorkBlk%!0=IconInfoWindow%
  630.  "Wimp_GetWindowState",,WorkBlk%
  631. *)fullsize%=((WorkBlk%!32)
  632.  (1<<18))<>0
  633.  fullsize% 
  634. selecticon(IconInfoWindow%,16,flags% 
  635.  1<<0)
  636. selecticon(IconInfoWindow%,17,flags% 
  637.  1<<1)
  638. selecticon(IconInfoWindow%,18,flags% 
  639.  1<<2)
  640. selecticon(IconInfoWindow%,19,flags% 
  641.  1<<3)
  642. selecticon(IconInfoWindow%,20,flags% 
  643.  1<<4)
  644. selecticon(IconInfoWindow%,21,flags% 
  645.  1<<5)
  646. selecticon(IconInfoWindow%,22,flags% 
  647.  1<<6)
  648. selecticon(IconInfoWindow%,23,flags% 
  649.  1<<7)
  650. selecticon(IconInfoWindow%,24,flags% 
  651.  1<<8)
  652. selecticon(IconInfoWindow%,25,flags% 
  653.  1<<9)
  654. selecticon(IconInfoWindow%,26,flags% 
  655.  1<<10)
  656. selecticon(IconInfoWindow%,27,flags% 
  657.  1<<11)
  658. selecticon(IconInfoWindow%,28,flags% 
  659.  1<<21)
  660.  *** Update the Pointer Info window
  661. update_ptrinfo
  662.  "Wimp_GetPointerInfo",,WorkBlk%
  663. seticontext(PtrInfoWindow%,3,
  664. (WorkBlk%!0))
  665. seticontext(PtrInfoWindow%,4,
  666. (WorkBlk%!4))
  667. seticontext(PtrInfoWindow%,5,
  668. (WorkBlk%!8))
  669.